<template>
    <div class="common-layout">
        <el-container>
            <el-header>

                智慧城市
            </el-header>
            <el-container>
                <el-aside width="200px">

                    <el-menu active-text-color="#ffd04b" background-color="#545c64" class="el-menu-vertical-demo"
                        default-active="2" text-color="#fff" router>
                        <el-sub-menu v-for="item in munes" :index='item.path'>

                            <template #title>
                                <el-icon>
                                    <location />
                                </el-icon>
                                <span>{{ item.des }}</span>
                            </template>

                            <el-menu-item v-for="subitem in item.children" :index="subitem.path">
                                {{ subitem.des }}
                            </el-menu-item>



                        </el-sub-menu>

                    </el-menu>


                </el-aside>
                <el-main>
                    <RouterView />
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>

<script setup lang="ts">
import { useSCStore } from '@/stores/myStore';
import { onMounted, ref } from 'vue';

const store = useSCStore();
const munes: any = ref([])
onMounted(() => {
    munes.value = store.adminEnums;
})

</script>